#pragma once
#include "stamessage.h"
#include <vector>
using namespace std;

class CstationDlg;

typedef struct
{
	STAMSG stamsg;
	CString stationID;
	CString time;
}ALARMITEM;

class CAlarmModel
{
public:
	static CAlarmModel * GetInstance();
	~CAlarmModel(void);
	static void DeleteInstance();
	bool InAlarm(STAMSG * pAlarm, const CString & stationID);
	void SetViewDlg ( CstationDlg * pDlg ){dlg = pDlg;}
	//

private:
	CAlarmModel(void);
	static CAlarmModel * pInstance;
	vector<ALARMITEM>	v_stamsg;
	CstationDlg * dlg;
public:
	void saveAlarm(void);
};
